//index.js


Page({
  calc:function(e){
    var rmb=parseFloat(e.detail.value.cels);
    this.setData({
      M:(rmb/6.8801).toFixed(4),
      Y:(rmb/8.7873).toFixed(4),
      G:(rmb/0.8805).toFixed(4),
      O:(rmb/7.8234).toFixed(4),
      H:(rmb/0.0061).toFixed(4),
      R:(rmb/0.0610).toFixed(4)
    })
  },
  reset:function(){
    this.setData({
      M:"",
      Y:"",
      G:"",
      O:"",
      H:"",
      R:""
    })
  }
})
